home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Cl…Business) - New Member 21 / Software of the Month Club XXI - New Member Business.ISO / mac / Business / Financial Portfolio v4.1 ƒ / Financial Portfolio v4.1 / Financial Portfolio v4.1.rsrc / LENS_142_Stock Price.bin < prev    next >
Text File  |  1995-11-23  |  4KB  |  101 lines

  1. ItemType: WIND
  2. Rect: 144,336,461,454
  3. AutoSize: FALSE
  4. Style: Dialog
  5. HasTitleBar: TRUE
  6. HasZoomBox: FALSE
  7. Name: Stock Price
  8. Script: if objValue="Open" then ┬  global priceFactor┬  get wsGet(wdID,"multiplier:","Hilite")┬  if it=true then┬    set numberFormat to "0.000"┬    wsSet wdID,"mult","Disabled","false"┬    wsSet wdID,"change","Disabled", "false"┬    get wsGet(wdID,"newprice","Text")┬    if it¡empty then┬      wsSet wdID,"newprice","Text",it*priceFactor┬    end if┬  else┬    wsSet wdID,"mult","Disabled","true"┬    wsSet wdID,"change","Disabled", "true"┬  end if┬  wsSet wdID,"newprice","Selection", "0,10"┬end if
  9. Params: i4_Text┬i6_Text┬i0_TopLeft┬i6_Selection┬i11_Text┬i10_Hilite
  10. Result: i6_Text┬i11_Text┬i10_Hilite
  11.  
  12. ItemType: PUSH
  13. Rect: 232,88,304,108
  14. AutoSize: FALSE
  15. Name: Enter
  16. DefaultItem: TRUE
  17. Script: get wsGet(wdID,"newprice","text")┬if (it=empty) or (it=0) then┬  alertNote("Enter a price, cancel or skip.")┬else┬  wsSend wdID,"0","close"┬end if 
  18.  
  19. ItemType: PUSH
  20. Rect: 120,88,200,108
  21. Name: cancel
  22. CancelItem: TRUE
  23. AutoClose: TRUE
  24.  
  25. ItemType: PUSH
  26. Rect: 15,80,95,100
  27. Visible: FALSE
  28. Name: skip
  29. AutoClose: TRUE
  30.  
  31. ItemType: TEXT
  32. Rect: 8,5,288,23
  33. TextSize: 12
  34. AutoSize: FALSE
  35. Name: Stock
  36.  
  37. ItemType: TEXT
  38. Rect: 10,124,310,156
  39. TextFont: Geneva
  40. TextSize: 10
  41. AutoSize: FALSE
  42. Name: instr
  43. Text: Enter the price either as decimals or with a space between the whole number and fraction {e.g., 67.125  or  67 1/8}.
  44.  
  45. ItemType: TEXT
  46. Rect: 82,32,182,54
  47. TextSize: 12
  48. AutoSize: FALSE
  49. Name: newprice
  50. LockText: FALSE
  51. TextAlign: Right
  52.  
  53. ItemType: PUSH
  54. Rect: 283,3,305,23
  55. AutoSize: FALSE
  56. Name: ?
  57. Script: get wsGet(wdID,"0","Height")┬if it>200 then┬  wsSet wdID,"0","Height", "118"┬else┬  wsSet wdID,"0","Height", "282"┬end if
  58.  
  59. ItemType: LBL
  60. Rect: 2,34,83,50
  61. TextFont: Geneva
  62. TextSize: 12
  63. Text: Price/share:
  64.  
  65. ItemType: TEXT
  66. Rect: 10,162,310,322
  67. TextFont: Geneva
  68. TextSize: 10
  69. AutoSize: FALSE
  70. Name: instr2
  71. Text: Checking ╥multiplier╙ will show the price multiplied by a factor so that you can easily compare it with your new entry. The default multiplier that appears here is set in the Preferences section. Enter a multiplier besides 1.00 (click ╥change╙) if you want the price displayed to be a multiple of the ╥standard╙ price (e.g., if you enter cents rather than dollars, set the multiplier to be 100 to convert from standard ╥dollar╙ format). The price will be converted back to ╥standard╙ format for storage in the stack.
  72.  
  73. ItemType: CHK
  74. Rect: 188,34,267,47
  75. TextFont: Geneva
  76. TextSize: 10
  77. Name: multiplier:
  78. Script: get wsGet(wdID,"mult","Text")┬put it into mm┬get wsGet(wdID,"newprice","Text")┬put it into thePrice┬if thePrice¡empty then┬  get wsGet(wdID,"multiplier:","Hilite")┬  put it into hh┬  set numberFormat to "0.000"┬  if hh=true then┬    wsSet wdID,"newprice","Text",thePrice*mm┬    wsSet wdID,"mult","Disabled","FALSE"┬    wsSet wdID,"change","Disabled","FALSE"┬  else┬    wsSet wdID,"newprice","Text",thePrice/mm┬    wsSet wdID,"mult","Disabled", "true"┬    wsSet wdID,"change","Disabled", "true"┬  end if┬  wsSet wdID,"newprice","Selection", "0,10"┬end if
  79.  
  80. ItemType: TEXT
  81. Rect: 267,34,312,47
  82. TextFont: Geneva
  83. TextSize: 10
  84. AutoSize: FALSE
  85. Disabled: TRUE
  86. Name: mult
  87. Text: 1.00
  88.  
  89. ItemType: PUSH
  90. Rect: 265,51,301,67
  91. TextFont: Geneva
  92. TextSize: 9
  93. AutoSize: FALSE
  94. Disabled: TRUE
  95. Name: change
  96. Script: get wsGet(wdID,"mult","Text")┬put it into oldM┬if oldM=empty or oldM=0 then put "1.00" into oldM┬put windowScript("New multiplier",wstl(200,200),oldM) into rr┬if line 1 of rr="OK" then┬  put line 2 of rr into mm┬  set the numberFormat to "0"┬  if mm<1000 then set the numberFormat to "0.00"┬  if mm<1 then set the numberFormat to "0.0000"┬  add 0 to mm┬  put "Stock Price" into wdID --Ñ┬  wsSet wdID,"mult","Text",mm┬  get wsGet(wdID,"newPrice","Text")┬  put it into thePrice┬  if thePrice¡empty then┬    set numberFormat to "0.000"┬    wsSet wdID,"newprice","Text",(thePrice*mm/oldM)┬    wsSet wdID,"newprice","Selection","0,10"┬  end if┬end if
  97.  
  98. ItemType: TEXT
  99. Rect: 5,89,9,105
  100. Visible: FALSE
  101. Name: storedPrice